<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/service/clients/Client.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/service/clients/Client.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'ClientId',
                footer: "Foots",
                cnName: '客户管理',
                name: 'clients/Client',
                url: "base-write/api/Client/",
                sortName: "	 ClientId"
            });
            const editFormFields = ref({"ClientName":"","ClientPhone":"","ClientFox":"","ClientEmail":"","ClientLinkman":"","ClientAddress":"","CreateTime":"","ClientRemark":""});
            const editFormOptions = ref([[{"title":"客户名称","field":"ClientName"},
                               {"title":"联系方式","field":"ClientPhone"},
                               {"title":"传真","field":"ClientFox"}],
                              [{"title":"邮箱","field":"ClientEmail","type":"mail"},
                               {"title":"联系人","field":"ClientLinkman"},
                               {"title":"地址","field":"ClientAddress"}],
                              [{"title":"创建时间","field":"CreateTime","type":"datetime"},
                               {"title":"备注","field":"ClientRemark"}]]);
            const searchFormFields = ref({"ClientName":"","ClientPhone":""});
            const searchFormOptions = ref([[{"title":"客户名称","field":"ClientName"},{"title":"联系方式","field":"ClientPhone"}]]);
            const columns = ref([{field:'ClientId',title:'客户Id',type:'string',sort:true,width:220,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'ClientName',title:'客户名称',type:'string',sort:true,width:220,align:'left',sort:true},
                       {field:'ClientPhone',title:'联系方式',type:'string',sort:true,width:220,align:'left'},
                       {field:'ClientFox',title:'传真',type:'string',sort:true,width:220,align:'left'},
                       {field:'ClientEmail',title:'邮箱',type:'string',sort:true,width:220,align:'left'},
                       {field:'ClientLinkman',title:'联系人',type:'string',sort:true,width:220,align:'left'},
                       {field:'ClientAddress',title:'地址',type:'string',sort:true,width:220,align:'left'},
                       {field:'CreateTime',title:'创建时间',type:'datetime',sort:true,width:150,align:'left',sort:true},
                       {field:'ClientRemark',title:'备注',type:'string',sort:true,width:220,align:'left'},
                       {field:'IsDeleted',title:'IsDeleted',type:'sbyte',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
